//读取文件 并转换数组
const fs = require('fs')
const path = require('path')
const url = path.join(__dirname,'./info.json')
const data = fs.readFileSync(url,{encoding:'utf-8'})
console.log(data)

const data1 = JSON.parse(data)
console.log(data1) 

let render = data1[Math.floor(Math.random()*data1.length)]

render.count++
console.log(render)
fs.writeFileSync(url,JSON.stringify(data1),{encoding:'utf-8'})






